using System;
using System.Globalization;
using System.Windows;
using System.Windows.Data;
using vlcplay.ViewModels;

namespace vlcplay.Converters
{
    public class VideoMaximizeVisibilityMultiConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            var maximized = values[0] as VideoItemViewModel;
            var current = values[1] as VideoItemViewModel;
            if (maximized == null)
                return Visibility.Visible;
            return ReferenceEquals(maximized, current) ? Visibility.Visible : Visibility.Collapsed;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}